<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <title>签到抽奖</title>
    <link rel="stylesheet" href="<c:url value='/resource/css/osyear/main.css'></c:url>">
    <script language="JavaScript" src="<c:url value='/resource/js/jquery-2.0.min.js'/>"></script>
    <script language="JavaScript" src="<c:url value='/resource/js/jquery.form.min.js'/>"></script>
    <script language="JavaScript" href="<c:url value='/resource/js/osyear/layer/layer.js' />" ></script>
    <script language="JavaScript" src="<c:url value='/resource/js/osyear/FormValid.js'/>"></script>
    <script language="JavaScript" src="<c:url value='/resource/js/osyear/main.js'/>"></script>
    <script type="text/javascript">
        var count =0;
        $(function(){
            initBase64();
            window.setInterval(initBase64,30000);
        });
        function initBase64(){
            count++;
            $.ajax({

                url:'<c:url value="/api/qrcode/getBase64" />',
                type: "get",
                dataType :"json",
                success: function (data) {
                    console.log(data.img);
                    $("#qrcode").attr("src","data:image/png;base64,"+data.img)
                },
                error: function () {
                }

            });
          //  $("#refreshcount").html(count);
        }
    </script>
</head>
<body>
    <div class="ewmsm">
        <div class="ewmsm_main">
            <div class="ewmsm_main_t"></div>
            <div class="ewmsm_main_c">
                <img  id="qrcode" />
            </div>
            <div class="ewmsm_main_b"></div>
        </div>
    </div>
</body>

</html>